package br.com.map.comando;

import br.com.map.fabrica.FactoryBrincadeira;
import br.com.map.model.BixoVirtual;
import br.com.map.model.Brincadeira;

public class ComandoBrincar implements Command{
	
	private FactoryBrincadeira fabricaBrincadeira; 
	private BixoVirtual bicho; 
	
	public ComandoBrincar(FactoryBrincadeira fab) {
		this.fabricaBrincadeira = fab; 
		this.bicho = BixoVirtual.getInstance();
	}
	
	@Override
	public void execute() {
		Brincadeira brincadeira = fabricaBrincadeira.criaBrincadeira(); 
		bicho.brincar();
		StringBuilder sb = new StringBuilder();
		sb.append("Bicho brincando ");
		sb.append(brincadeira.infoBrincadeira());
		System.out.println(sb.toString());
		
	}
	
	

}
